//
//  UIButton+extension.swift
//  新浪微博
//
//  Created by 王之皆 on 16/12/31.
//  Copyright © 2016年 北京海狸先生网络科技有限公司. All rights reserved.
//

import UIKit


extension UIButton{
    convenience init(frame:CGRect, imageName: String, backImageName:String) {
        self.init(frame:frame)
        self.setImage(UIImage(named: imageName), for: .normal)
        self.setBackgroundImage(UIImage(named: backImageName), for: .normal)
    }

}

extension UIButton{
    convenience init(frame: CGRect,title:String,defualColor:UIColor,highlightedColor:UIColor,fontSize:CGFloat = 16) {
        self.init(frame:frame)
        self.setTitle(title, for: .normal)
        self.setTitleColor(defualColor, for: .normal)
        self.setTitleColor(highlightedColor, for: .highlighted)
        self.titleLabel?.font = UIFont.systemFont(ofSize: fontSize)
    }

}



































